package com.wondertek.poms.dao.pojo;

import com.wondertek.poms.common.utils.excel.annotation.ExcelField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author:W5349
 * @date:2020/12/29
 */
@Data
public class CpInfoPojo {

    @ExcelField(title = "CP编号", align = 2, sort = 1)
    @Length(message = "cp编号长度不能超过19个字节", max=19)
    @Pattern(message= "cp编号只能为数字串且不能为0或为空",regexp = "^[1-9][0-9]*$")
    private String cpId;

    @ExcelField(title = "CP名称", align = 2, sort = 1)
    @NotBlank(message = "CP名称不能为空")
    @Length(message = "cp名称长度不能超过1000个字节", max=1000)
    private String cpName;

}
